<template>
  <div>
      <headerCopy></headerCopy>
      <!-- 注册流程 -->
      <registerFlow :registerFlowData="registerFlowData"></registerFlow>
      <choice :show="identityShow" :typeNum="1"  @flowPClick="flowPClick"></choice>
      <identity v-if="typeShow === 0" :show="passwordShow" :typeNum="1"  @flowPClick="flowPClick"></identity>
      <emilName v-else-if="typeShow === 1" :show="passwordShow" :typeNum="1" @flowPClick="flowPClick"></emilName>
      <password :show="messageShow" :typeNum="1" @flowPClick="flowPClick"></password>
      <complete :show="completeShow" :typeNum="1"  @flowPClick="flowPClick"></complete>
  </div>
</template>

<script>
import Header from '@/components/header2'
// 注册流程
import registerFlow from '@/components/registerFlow'
import choice from '@/children/FPassword/children/choice'
import identity from '@/components/register/identity'
import password from '@/components/register/password'
import complete from '@/components/register/complete'
import emil from '@/components/FPassword/emil'

export default {
  data () {
    return {
      registerFlowData: {
        'choice': '选择方式',
        'validate': '验证身份',
        'password': '设置密码',
        'complete': '完成',
        'identityShowI': true,
        'messageShowI': false,
        'passwordShowI': false,
        'completeShowI': false,
      },
      identityShow: true,
      messageShow: false,
      passwordShow: false,
      completeShow: false,
      typeShow: '',
    }

  },
  components: {
    'registerFlow': registerFlow,
    'headerCopy': Header,
    'choice': choice,
    'identity': identity,
    'password': password,
    'complete': complete,
    'emilName': emil
  },
  methods: {
    flowPClick: function (obj) {
      this.identityShow = obj.identityShow
      this.messageShow = obj.messageShow
      this.passwordShow = obj.passwordShow
      this.completeShow = obj.completeShow
      this.typeShow = obj.typeShow
      this.registerFlowData.identityShowI = obj.identityShowI
      this.registerFlowData.messageShowI = obj.messageShowI
      this.registerFlowData.passwordShowI = obj.passwordShowI
      this.registerFlowData.completeShowI = obj.completeShowI
    }
  }
}
</script>

<style>
  .MinputTitle {
    display: inline-block;
    width: 120px;
    text-align: right;
    font-size: 14px;
    color: #2A2A2A;
    line-height: 20px;
}
.MinputTitle i {
    display: inline-block;
    vertical-align: sub;
    font-size: 14px;
    color: #D21111;
    margin-right: 10px;
    font-weight: 800;
    font-style: normal;
}
</style>
